package com.ulic.customerManApplication.achievementmodule.bo;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.ulic.customerManApplication.usermodule.bo.User;
@Entity
@Table(name="T_GYW_ACHIEVEMENT")
@SequenceGenerator(name="achievement_seq",sequenceName="S_GYW_ACHIEVEMENT_ID")
public class Achievement {

	private Integer id;
	private String achieveName;//成果名称
	private String achieveNumber;//成果数量
	private String school;//所在学校
	private Date createDate;// 创建日期

	private User user;// 创建者

	private String subCompany;// 分公司Id
	
	private String subCity;// 中支Id
	
	private String subComName;//分公司名称
	
	private String subCityName;//中支名称

	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="achievement_seq")
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getAchieveName() {
		return achieveName;
	}

	public void setAchieveName(String achieveName) {
		this.achieveName = achieveName;
	}

	public String getAchieveNumber() {
		return achieveNumber;
	}

	public void setAchieveNumber(String achieveNumber) {
		this.achieveNumber = achieveNumber;
	}

	public String getSchool() {
		return school;
	}

	public void setSchool(String school) {
		this.school = school;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.EAGER, optional = false)   
    @JoinColumn(name="UM_USER_ID")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getSubCompany() {
		return subCompany;
	}

	public void setSubCompany(String subCompany) {
		this.subCompany = subCompany;
	}

	public String getSubCity() {
		return subCity;
	}

	public void setSubCity(String subCity) {
		this.subCity = subCity;
	}

	public String getSubComName() {
		return subComName;
	}

	public void setSubComName(String subComName) {
		this.subComName = subComName;
	}

	public String getSubCityName() {
		return subCityName;
	}

	public void setSubCityName(String subCityName) {
		this.subCityName = subCityName;
	}

	
}
